package edu.biwu.sms02;

import java.io.IOException;
import java.util.UUID;

public class Demo02 {
    public static void main(String[] args) throws Exception {
        //method02();
        //method03();
        StudentManagementSystem02 sms = new StudentManagementSystem02();
        //1。从中学生信息.txt中加载小学生信息到系统
        sms.loadStudentFromFile("day25-junit\\中学生信息.txt");
        sms.writeRankedStudentToFile("day25-junit\\总分排名.txt");

        sms.showAllStudent();

    }

    private static void method03() throws IOException {
        StudentManagementSystem02 sms = new StudentManagementSystem02();
        //1。从中学生信息.txt中加载小学生信息到系统
        sms.loadStudentFromFile("day25-junit\\中学生信息.txt");

        //2.展示学生
        sms.showAllStudent();

        //3.先按照总分从高到低排序
        sms.sortByTotalScore();
        System.out.println("--------------名次从高到低------------");
        //4.展示排完序的学生
        sms.showAllStudent();
    }

    private static void method02() throws IOException {
        StudentManagementSystem02 sms = new StudentManagementSystem02();
        //1。从小学生信息.txt中加载小学生信息到系统
        sms.loadStudentFromFile("day25-junit\\小学生信息.txt");

        //2.展示学生
        sms.showAllStudent();
    }

    private static void method01() {
        //UUID可以保证每次生成的序列唯一
        System.out.println(UUID.randomUUID());
    }
}